﻿namespace WinForms.ControlList.Guest
{
    using Bll.Guest;
    using Bll.Systems;
    using Model.Guest;
    using Model.Systems;
    using System;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Runtime.InteropServices;
    using System.Windows.Forms;
    using WinForms;
    using WinForms.Properties;

    public class FrmGuestEdit : Form
    {
        private Button btn_Close;
        private Button btn_Save;
        private IContainer components;
        private ConfigEnt config;
        private ComboBoxNew drp_ClearingType;
        private ComboBoxNew drp_GuestGreadType;
        private ComboBoxNew drp_GuestType;
        private ComboBoxNew drp_PayType;
        public const int HTCAPTION = 2;
        private Label label1;
        private Label label2;
        private Label lbl_BiTian;
        private Label lbl_ChainTel;
        private Label lbl_ClearingType;
        private Label lbl_CompanyName;
        private Label lbl_GuestGread;
        private Label lbl_GuestId;
        private Label lbl_GuestName;
        private Label lbl_GuestType;
        private Label lbl_PayType;
        private Label lbl_Remark;
        private Label lbl_Tel;
        private Label lbl_TiShi;
        private Label lbl_TiShi2;
        private Label lbl_XuanTian;
        private Label lblTitle;
        private LinkLabel link_AddGuestZheKou;
        private Panel pan_14;
        private Panel pan_15;
        private Panel pan_16;
        private Panel pan_24;
        private Panel pan_AllPanel;
        private Panel pan_AllPlanes;
        private Panel pan_Bottoms;
        private Panel pan_Company;
        private Panel pan_Dock;
        private Panel pan_DockBottom;
        private Panel pan_DockLeft;
        private Panel pan_DockRight;
        private Panel pan_Individual;
        private Panel pan_jiange;
        private Panel pan_Lefts;
        private Panel pan_Rights;
        private Panel pan_Table1;
        private Panel pan_Table2;
        private Panel pan_Table3;
        private Panel pan_td13;
        private Panel pan_td17;
        private Panel pan_td19;
        private Panel pan_td20;
        private Panel pan_td21;
        private Panel pan_td22;
        private Panel pan_td23;
        private Panel pan_td25;
        private Panel pan_td26;
        private Panel pan_td27;
        private Panel pan_td28;
        private Panel pan_td4;
        private Panel pan_td5;
        private Panel pan_td6;
        private Panel pan_td7;
        private Panel pan_td8;
        private Panel pan_Top;
        private Panel pan_TopLeft;
        private Panel pan_TopRight;
        private Panel pan_tr18;
        private Panel pan_ZhongJian;
        private Panel pane_td3;
        private Panel pane_TopT;
        private Panel panel_BiTian;
        private Panel panel_Button;
        private Panel panel_td1;
        private Panel panel_td2;
        private Panel panel_XuanTian;
        private Panel panel15;
        private Panel panel2;
        private Panel panel8;
        private Panel panel9;
        public FrmPrompt prom;
        public const int SC_MOVE = 0xf010;
        private TextBox txt_Address;
        private TextBox txt_CoLinkName;
        private TextBox txt_CoName;
        private TextBox txt_CoTel;
        private TextBox txt_GuestMoble;
        private TextBox txt_GuestName;
        private TextBox txt_Remark;
        private UserEnt user;
        public const int WM_SYSCOMMAND = 0x112;

        public FrmGuestEdit()
        {
            this.config = null;
            this.user = null;
            this.prom = null;
            this.components = null;
        }

        public FrmGuestEdit(int id) : this()
        {
            this.InitializeComponent();
            base.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            base.SetStyle(ControlStyles.UserPaint, true);
            base.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.lbl_GuestId.Text = id.ToString();
            GuestEnt model = GuestBll.GetModel(id);
            this.config = ConfigBll.GetModel(1);
            this.user = PublicAppliction.LoginUser;
            if (this.config.IsUseAgio == 0)
            {
                this.pan_Table1.Visible = false;
            }
            else
            {
                DataTable table = GuestGradeBll.GetList("ChainNum=" + this.user.ChainNum);
                foreach (DataRow row in table.Rows)
                {
                    this.drp_GuestGreadType.Items.Add(new ComboxItem(row["GuestName"].ToString(), row["GuestTypeId"].ToString()));
                }
                if (table.Rows.Count > 0)
                {
                    this.drp_GuestGreadType.SelectedIndex = 0;
                }
            }
            this.drp_PayType.BeginUpdate();
            this.drp_PayType.Items.Clear();
            DataTable list = ParameterBll.GetList("parrefname='Payment'");
            foreach (DataRow row in list.Rows)
            {
                this.drp_PayType.Items.Add(new ComboxItem(row["parname"].ToString(), row["parid"].ToString()));
            }
            if (list.Rows.Count > 0)
            {
                this.drp_PayType.SelectedIndex = 0;
            }
            this.drp_PayType.EndUpdate();
            this.drp_ClearingType.BeginUpdate();
            this.drp_ClearingType.Items.Clear();
            list = ParameterBll.GetList("parrefname='Clearing'");
            foreach (DataRow row in list.Rows)
            {
                this.drp_ClearingType.Items.Add(new ComboxItem(row["parname"].ToString(), row["parid"].ToString()));
            }
            if (list.Rows.Count > 0)
            {
                this.drp_ClearingType.SelectedIndex = 0;
            }
            this.drp_ClearingType.EndUpdate();
            if (model != null)
            {
                this.drp_GuestGreadType.SelectValueNew = model.GuestTypeId.ToString();
                if (model.GuestTypes.ToString() == "1")
                {
                    this.drp_GuestType.Text = "个人";
                    this.txt_GuestName.Text = model.GuestName;
                    this.txt_GuestMoble.Text = model.Tel;
                }
                else
                {
                    this.drp_GuestType.Text = "公司";
                    this.txt_CoName.Text = model.GuestName;
                    this.txt_CoTel.Text = model.Tel;
                    this.txt_CoLinkName.Text = model.OtherTel;
                }
                this.drp_ClearingType.SelectValueNew = model.ClearingType.ToString();
                this.txt_Address.Text = model.Addresses;
            }
            this.txt_GuestName.Select();
            base.KeyPreview = true;
            base.KeyDown += new KeyEventHandler(this.Form_KeyDown);
        }

        private void btn_Close_Click(object sender, EventArgs e)
        {
            base.DialogResult = DialogResult.Cancel;
            base.Close();
        }

        private void btn_Save_Click(object sender, EventArgs e)
        {
            try
            {
                if ((this.config != null) && ((this.config.IsUseAgio == 1) && (this.drp_GuestGreadType.Text == "")))
                {
                    this.prom = new FrmPrompt(false, "请选择客户折扣类型");
                    this.prom.ShowDialog();
                    this.drp_GuestGreadType.Select();
                }
                else
                {
                    if (this.drp_GuestType.Text == "个人")
                    {
                        if (this.txt_GuestName.Text.Trim() == "")
                        {
                            this.prom = new FrmPrompt(false, "请输入客户名称");
                            this.prom.ShowDialog();
                            this.txt_GuestName.Select();
                            return;
                        }
                        if (this.txt_GuestMoble.Text.Trim() == "")
                        {
                            this.prom = new FrmPrompt(false, "请输入客户手机");
                            this.prom.ShowDialog();
                            this.txt_GuestMoble.Select();
                            return;
                        }
                    }
                    else
                    {
                        if (this.txt_CoName.Text.Trim() == "")
                        {
                            this.prom = new FrmPrompt(false, "请输入公司名称");
                            this.prom.ShowDialog();
                            this.txt_CoName.Select();
                            return;
                        }
                        if (this.txt_CoTel.Text.Trim() == "")
                        {
                            this.prom = new FrmPrompt(false, "请输入公司联系电话");
                            this.prom.ShowDialog();
                            this.txt_CoTel.Select();
                            return;
                        }
                        if (this.txt_CoLinkName.Text.Trim() == "")
                        {
                            this.prom = new FrmPrompt(false, "请输入公司联系人");
                            this.prom.ShowDialog();
                            this.txt_CoLinkName.Select();
                            return;
                        }
                    }
                    GuestEnt model = GuestBll.GetModel(int.Parse(this.lbl_GuestId.Text));
                    model.ChainNum = this.user.ChainNum;
                    model.Addresses = this.txt_Address.Text;
                    model.ClearingType = int.Parse(((ComboxItem) this.drp_ClearingType.SelectedItem).Value.ToString());
                    model.PayType = int.Parse(((ComboxItem) this.drp_PayType.SelectedItem).Value.ToString());
                    model.Remark = this.txt_Remark.Text;
                    model.UpdateTime = DateTime.Now;
                    model.CreateMan = this.user.UserId;
                    if (this.config != null)
                    {
                        if (this.config.IsUseAgio == 1)
                        {
                            model.GuestTypeId = int.Parse(((ComboxItem) this.drp_GuestGreadType.SelectedItem).Value.ToString());
                        }
                        else
                        {
                            model.GuestTypeId = 0;
                        }
                    }
                    if (this.drp_GuestType.Text == "个人")
                    {
                        model.GuestName = this.txt_GuestName.Text;
                        model.GuestTypes = 1;
                        model.Tel = this.txt_GuestMoble.Text;
                        model.OtherTel = "";
                    }
                    else
                    {
                        model.GuestTypes = 2;
                        model.GuestName = this.txt_CoName.Text;
                        model.Tel = this.txt_CoTel.Text;
                        model.OtherTel = this.txt_CoLinkName.Text;
                    }
                    GuestBll.Update(model);
                    this.prom = new FrmPrompt(true, "客户信息修改成功");
                    this.prom.ShowDialog();
                    WorkLogBll.AddNewLog("客户信息修改成功", "FrmGuestEdit", PublicAppliction.LoginUser);
                    base.DialogResult = DialogResult.OK;
                    base.Close();
                }
            }
            catch (Exception exception)
            {
                ErrorsBll.NewException(exception, PublicAppliction.LoginUser);
            }
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void drp_ClearingType_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == '\r')
            {
                this.txt_Address.Select();
            }
        }

        private void drp_GuestGreadType_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == '\r')
            {
                if (this.drp_GuestType.Text == "个人")
                {
                    this.txt_GuestName.Select();
                }
                else
                {
                    this.txt_CoName.Select();
                }
            }
        }

        private void drp_GuestType_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == '\r')
            {
                this.drp_GuestGreadType.Select();
            }
        }

        private void drp_GuestType_SelectedValueChanged(object sender, EventArgs e)
        {
            if (this.drp_GuestType.Text == "个人")
            {
                this.pan_Individual.Visible = true;
                this.pan_Company.Visible = false;
                base.Height = 340;
            }
            else
            {
                this.pan_Individual.Visible = false;
                this.pan_Company.Visible = true;
                base.Height = 380;
            }
        }

        private void drp_PayType_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == '\r')
            {
                this.drp_ClearingType.Select();
            }
        }

        protected void Form_KeyDown(object sender, KeyEventArgs e)
        {
            if ((e.Control && (e.KeyCode == Keys.S)) && (MessageBox.Show("您确定要保存吗?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk) == DialogResult.OK))
            {
                this.btn_Save_Click(null, null);
            }
        }

        private void InitializeComponent()
        {
            this.pan_ZhongJian = new Panel();
            this.lblTitle = new Label();
            this.pan_TopRight = new Panel();
            this.pan_DockLeft = new Panel();
            this.pan_Dock = new Panel();
            this.pan_AllPanel = new Panel();
            this.pan_AllPlanes = new Panel();
            this.panel15 = new Panel();
            this.pan_td28 = new Panel();
            this.txt_Remark = new TextBox();
            this.pan_td27 = new Panel();
            this.lbl_Remark = new Label();
            this.pan_td26 = new Panel();
            this.txt_Address = new TextBox();
            this.pan_td25 = new Panel();
            this.label1 = new Label();
            this.panel8 = new Panel();
            this.pan_24 = new Panel();
            this.drp_ClearingType = new ComboBoxNew();
            this.pan_td23 = new Panel();
            this.lbl_ClearingType = new Label();
            this.pan_td22 = new Panel();
            this.drp_PayType = new ComboBoxNew();
            this.pan_td21 = new Panel();
            this.lbl_PayType = new Label();
            this.panel_XuanTian = new Panel();
            this.lbl_XuanTian = new Label();
            this.pan_jiange = new Panel();
            this.pan_Company = new Panel();
            this.panel2 = new Panel();
            this.pan_td20 = new Panel();
            this.pan_td19 = new Panel();
            this.pan_tr18 = new Panel();
            this.txt_CoLinkName = new TextBox();
            this.pan_td17 = new Panel();
            this.label2 = new Label();
            this.pan_Table3 = new Panel();
            this.pan_16 = new Panel();
            this.txt_CoTel = new TextBox();
            this.pan_15 = new Panel();
            this.lbl_ChainTel = new Label();
            this.pan_14 = new Panel();
            this.txt_CoName = new TextBox();
            this.pan_td13 = new Panel();
            this.lbl_CompanyName = new Label();
            this.pan_Individual = new Panel();
            this.pan_Table2 = new Panel();
            this.pan_td8 = new Panel();
            this.txt_GuestMoble = new TextBox();
            this.pan_td7 = new Panel();
            this.lbl_Tel = new Label();
            this.pan_td6 = new Panel();
            this.txt_GuestName = new TextBox();
            this.pan_td5 = new Panel();
            this.lbl_GuestName = new Label();
            this.pan_Table1 = new Panel();
            this.panel_td2 = new Panel();
            this.link_AddGuestZheKou = new LinkLabel();
            this.drp_GuestGreadType = new ComboBoxNew();
            this.panel_td1 = new Panel();
            this.lbl_GuestGread = new Label();
            this.pan_td4 = new Panel();
            this.drp_GuestType = new ComboBoxNew();
            this.pane_td3 = new Panel();
            this.lbl_GuestType = new Label();
            this.panel_BiTian = new Panel();
            this.lbl_GuestId = new Label();
            this.lbl_BiTian = new Label();
            this.panel_Button = new Panel();
            this.lbl_TiShi2 = new Label();
            this.lbl_TiShi = new Label();
            this.btn_Close = new Button();
            this.btn_Save = new Button();
            this.panel9 = new Panel();
            this.pan_Rights = new Panel();
            this.pan_Lefts = new Panel();
            this.pan_Bottoms = new Panel();
            this.pane_TopT = new Panel();
            this.pan_DockBottom = new Panel();
            this.pan_DockRight = new Panel();
            this.pan_Top = new Panel();
            this.pan_TopLeft = new Panel();
            this.pan_ZhongJian.SuspendLayout();
            this.pan_Dock.SuspendLayout();
            this.pan_AllPanel.SuspendLayout();
            this.pan_AllPlanes.SuspendLayout();
            this.panel15.SuspendLayout();
            this.pan_td28.SuspendLayout();
            this.pan_td27.SuspendLayout();
            this.pan_td26.SuspendLayout();
            this.pan_td25.SuspendLayout();
            this.panel8.SuspendLayout();
            this.pan_24.SuspendLayout();
            this.pan_td23.SuspendLayout();
            this.pan_td22.SuspendLayout();
            this.pan_td21.SuspendLayout();
            this.panel_XuanTian.SuspendLayout();
            this.pan_Company.SuspendLayout();
            this.panel2.SuspendLayout();
            this.pan_tr18.SuspendLayout();
            this.pan_td17.SuspendLayout();
            this.pan_Table3.SuspendLayout();
            this.pan_16.SuspendLayout();
            this.pan_15.SuspendLayout();
            this.pan_14.SuspendLayout();
            this.pan_td13.SuspendLayout();
            this.pan_Individual.SuspendLayout();
            this.pan_Table2.SuspendLayout();
            this.pan_td8.SuspendLayout();
            this.pan_td7.SuspendLayout();
            this.pan_td6.SuspendLayout();
            this.pan_td5.SuspendLayout();
            this.pan_Table1.SuspendLayout();
            this.panel_td2.SuspendLayout();
            this.panel_td1.SuspendLayout();
            this.pan_td4.SuspendLayout();
            this.pane_td3.SuspendLayout();
            this.panel_BiTian.SuspendLayout();
            this.panel_Button.SuspendLayout();
            this.pan_Top.SuspendLayout();
            base.SuspendLayout();
            this.pan_ZhongJian.BackgroundImage = Resources.uc_title_2;
            this.pan_ZhongJian.Controls.Add(this.lblTitle);
            this.pan_ZhongJian.Dock = DockStyle.Fill;
            this.pan_ZhongJian.Location = new Point(0x1f, 0);
            this.pan_ZhongJian.Name = "pan_ZhongJian";
            this.pan_ZhongJian.Size = new Size(0x312, 0x20);
            this.pan_ZhongJian.TabIndex = 2;
            this.pan_ZhongJian.MouseDown += new MouseEventHandler(this.pan_ZhongJian_MouseDown);
            this.lblTitle.AutoSize = true;
            this.lblTitle.BackColor = Color.FromArgb(0, 0, 15, 0xff);
            this.lblTitle.Font = new Font("宋体", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0x86);
            this.lblTitle.ForeColor = Color.FromArgb(0x3b, 0x56, 20);
            this.lblTitle.Location = new Point(6, 8);
            this.lblTitle.Name = "lblTitle";
            this.lblTitle.Size = new Size(0x5b, 13);
            this.lblTitle.TabIndex = 0;
            this.lblTitle.Text = "修改客户资料";
            this.pan_TopRight.BackgroundImage = Resources.uc_title_1;
            this.pan_TopRight.Dock = DockStyle.Right;
            this.pan_TopRight.Location = new Point(0x331, 0);
            this.pan_TopRight.Name = "pan_TopRight";
            this.pan_TopRight.Size = new Size(5, 0x20);
            this.pan_TopRight.TabIndex = 1;
            this.pan_DockLeft.BackColor = Color.FromArgb(0xaf, 0xbf, 190);
            this.pan_DockLeft.Dock = DockStyle.Left;
            this.pan_DockLeft.Location = new Point(0, 0);
            this.pan_DockLeft.Name = "pan_DockLeft";
            this.pan_DockLeft.Size = new Size(1, 0x134);
            this.pan_DockLeft.TabIndex = 0;
            this.pan_Dock.BackColor = Color.FromArgb(0, 0, 15, 0xff);
            this.pan_Dock.Controls.Add(this.pan_AllPanel);
            this.pan_Dock.Controls.Add(this.pan_DockBottom);
            this.pan_Dock.Controls.Add(this.pan_DockRight);
            this.pan_Dock.Controls.Add(this.pan_DockLeft);
            this.pan_Dock.Dock = DockStyle.Fill;
            this.pan_Dock.Location = new Point(0, 0x20);
            this.pan_Dock.Name = "pan_Dock";
            this.pan_Dock.Size = new Size(0x336, 0x134);
            this.pan_Dock.TabIndex = 5;
            this.pan_AllPanel.BackColor = Color.White;
            this.pan_AllPanel.Controls.Add(this.pan_AllPlanes);
            this.pan_AllPanel.Controls.Add(this.pan_Rights);
            this.pan_AllPanel.Controls.Add(this.pan_Lefts);
            this.pan_AllPanel.Controls.Add(this.pan_Bottoms);
            this.pan_AllPanel.Controls.Add(this.pane_TopT);
            this.pan_AllPanel.Dock = DockStyle.Fill;
            this.pan_AllPanel.Location = new Point(1, 0);
            this.pan_AllPanel.Name = "pan_AllPanel";
            this.pan_AllPanel.Size = new Size(820, 0x133);
            this.pan_AllPanel.TabIndex = 3;
            this.pan_AllPlanes.Controls.Add(this.panel15);
            this.pan_AllPlanes.Controls.Add(this.pan_td26);
            this.pan_AllPlanes.Controls.Add(this.panel8);
            this.pan_AllPlanes.Controls.Add(this.panel_XuanTian);
            this.pan_AllPlanes.Controls.Add(this.pan_jiange);
            this.pan_AllPlanes.Controls.Add(this.pan_Company);
            this.pan_AllPlanes.Controls.Add(this.pan_Individual);
            this.pan_AllPlanes.Controls.Add(this.pan_Table1);
            this.pan_AllPlanes.Controls.Add(this.pan_td4);
            this.pan_AllPlanes.Controls.Add(this.panel_BiTian);
            this.pan_AllPlanes.Controls.Add(this.panel_Button);
            this.pan_AllPlanes.Controls.Add(this.panel9);
            this.pan_AllPlanes.Dock = DockStyle.Fill;
            this.pan_AllPlanes.Location = new Point(10, 10);
            this.pan_AllPlanes.Name = "pan_AllPlanes";
            this.pan_AllPlanes.Size = new Size(800, 0x11f);
            this.pan_AllPlanes.TabIndex = 4;
            this.panel15.Controls.Add(this.pan_td28);
            this.panel15.Controls.Add(this.pan_td27);
            this.panel15.Dock = DockStyle.Top;
            this.panel15.Location = new Point(0, 240);
            this.panel15.Name = "panel15";
            this.panel15.Size = new Size(800, 0x19);
            this.panel15.TabIndex = 0x18;
            this.pan_td28.Controls.Add(this.txt_Remark);
            this.pan_td28.Dock = DockStyle.Fill;
            this.pan_td28.Location = new Point(200, 0);
            this.pan_td28.Name = "pan_td28";
            this.pan_td28.Size = new Size(600, 0x19);
            this.pan_td28.TabIndex = 1;
            this.pan_td28.Paint += new PaintEventHandler(this.pan_td28_Paint);
            this.txt_Remark.Location = new Point(3, 2);
            this.txt_Remark.MaxLength = 200;
            this.txt_Remark.Name = "txt_Remark";
            this.txt_Remark.Size = new Size(0x23c, 0x15);
            this.txt_Remark.TabIndex = 11;
            this.txt_Remark.KeyPress += new KeyPressEventHandler(this.txt_Remark_KeyPress);
            this.pan_td27.Controls.Add(this.lbl_Remark);
            this.pan_td27.Dock = DockStyle.Left;
            this.pan_td27.Location = new Point(0, 0);
            this.pan_td27.Name = "pan_td27";
            this.pan_td27.Size = new Size(200, 0x19);
            this.pan_td27.TabIndex = 0;
            this.pan_td27.Paint += new PaintEventHandler(this.pan_td27_Paint);
            this.lbl_Remark.Location = new Point(0x6c, 6);
            this.lbl_Remark.Name = "lbl_Remark";
            this.lbl_Remark.Size = new Size(0x54, 12);
            this.lbl_Remark.TabIndex = 1;
            this.lbl_Remark.Text = "备注:";
            this.lbl_Remark.TextAlign = ContentAlignment.MiddleRight;
            this.pan_td26.Controls.Add(this.txt_Address);
            this.pan_td26.Controls.Add(this.pan_td25);
            this.pan_td26.Dock = DockStyle.Top;
            this.pan_td26.Location = new Point(0, 0xd7);
            this.pan_td26.Name = "pan_td26";
            this.pan_td26.Size = new Size(800, 0x19);
            this.pan_td26.TabIndex = 0x17;
            this.pan_td26.Paint += new PaintEventHandler(this.pan_td26_Paint);
            this.txt_Address.Location = new Point(0xcb, 2);
            this.txt_Address.MaxLength = 100;
            this.txt_Address.Name = "txt_Address";
            this.txt_Address.Size = new Size(0x23c, 0x15);
            this.txt_Address.TabIndex = 10;
            this.txt_Address.KeyPress += new KeyPressEventHandler(this.txt_Address_KeyPress);
            this.pan_td25.Controls.Add(this.label1);
            this.pan_td25.Dock = DockStyle.Left;
            this.pan_td25.Location = new Point(0, 0);
            this.pan_td25.Name = "pan_td25";
            this.pan_td25.Size = new Size(200, 0x19);
            this.pan_td25.TabIndex = 1;
            this.pan_td25.Paint += new PaintEventHandler(this.pan_td25_Paint);
            this.label1.Location = new Point(0x6c, 6);
            this.label1.Name = "label1";
            this.label1.Size = new Size(0x54, 12);
            this.label1.TabIndex = 1;
            this.label1.Text = "地址:";
            this.label1.TextAlign = ContentAlignment.MiddleRight;
            this.panel8.Controls.Add(this.pan_24);
            this.panel8.Controls.Add(this.pan_td23);
            this.panel8.Controls.Add(this.pan_td22);
            this.panel8.Controls.Add(this.pan_td21);
            this.panel8.Dock = DockStyle.Top;
            this.panel8.Location = new Point(0, 190);
            this.panel8.Name = "panel8";
            this.panel8.Size = new Size(800, 0x19);
            this.panel8.TabIndex = 0x16;
            this.pan_24.Controls.Add(this.drp_ClearingType);
            this.pan_24.Dock = DockStyle.Left;
            this.pan_24.Location = new Point(600, 0);
            this.pan_24.Name = "pan_24";
            this.pan_24.Size = new Size(200, 0x19);
            this.pan_24.TabIndex = 3;
            this.pan_24.Paint += new PaintEventHandler(this.pan_24_Paint);
            this.drp_ClearingType.DisplayMember = "Name";
            this.drp_ClearingType.DropDownStyle = ComboBoxStyle.DropDownList;
            this.drp_ClearingType.FormattingEnabled = true;
            this.drp_ClearingType.Location = new Point(4, 2);
            this.drp_ClearingType.Name = "drp_ClearingType";
            this.drp_ClearingType.SelectValueNew = "";
            this.drp_ClearingType.Size = new Size(0xab, 20);
            this.drp_ClearingType.TabIndex = 9;
            this.drp_ClearingType.ValueMember = "Value";
            this.drp_ClearingType.KeyPress += new KeyPressEventHandler(this.drp_ClearingType_KeyPress);
            this.pan_td23.Controls.Add(this.lbl_ClearingType);
            this.pan_td23.Dock = DockStyle.Left;
            this.pan_td23.Location = new Point(400, 0);
            this.pan_td23.Name = "pan_td23";
            this.pan_td23.Size = new Size(200, 0x19);
            this.pan_td23.TabIndex = 2;
            this.pan_td23.Paint += new PaintEventHandler(this.pan_td23_Paint);
            this.lbl_ClearingType.AutoSize = true;
            this.lbl_ClearingType.Location = new Point(0x86, 6);
            this.lbl_ClearingType.Name = "lbl_ClearingType";
            this.lbl_ClearingType.Size = new Size(0x3b, 12);
            this.lbl_ClearingType.TabIndex = 2;
            this.lbl_ClearingType.Text = "结算类型:";
            this.lbl_ClearingType.TextAlign = ContentAlignment.MiddleRight;
            this.pan_td22.Controls.Add(this.drp_PayType);
            this.pan_td22.Dock = DockStyle.Left;
            this.pan_td22.Location = new Point(200, 0);
            this.pan_td22.Name = "pan_td22";
            this.pan_td22.Size = new Size(200, 0x19);
            this.pan_td22.TabIndex = 1;
            this.pan_td22.Paint += new PaintEventHandler(this.pan_td22_Paint);
            this.drp_PayType.DisplayMember = "Name";
            this.drp_PayType.DropDownStyle = ComboBoxStyle.DropDownList;
            this.drp_PayType.FormattingEnabled = true;
            this.drp_PayType.Location = new Point(3, 3);
            this.drp_PayType.Name = "drp_PayType";
            this.drp_PayType.SelectValueNew = "";
            this.drp_PayType.Size = new Size(0xab, 20);
            this.drp_PayType.TabIndex = 8;
            this.drp_PayType.ValueMember = "Value";
            this.drp_PayType.KeyPress += new KeyPressEventHandler(this.drp_PayType_KeyPress);
            this.pan_td21.Controls.Add(this.lbl_PayType);
            this.pan_td21.Dock = DockStyle.Left;
            this.pan_td21.Location = new Point(0, 0);
            this.pan_td21.Name = "pan_td21";
            this.pan_td21.Size = new Size(200, 0x19);
            this.pan_td21.TabIndex = 0;
            this.pan_td21.Paint += new PaintEventHandler(this.pan_td21_Paint);
            this.lbl_PayType.Location = new Point(0x6c, 6);
            this.lbl_PayType.Name = "lbl_PayType";
            this.lbl_PayType.Size = new Size(0x54, 12);
            this.lbl_PayType.TabIndex = 1;
            this.lbl_PayType.Text = "付款方式:";
            this.lbl_PayType.TextAlign = ContentAlignment.MiddleRight;
            this.panel_XuanTian.Controls.Add(this.lbl_XuanTian);
            this.panel_XuanTian.Dock = DockStyle.Top;
            this.panel_XuanTian.Location = new Point(0, 0xa5);
            this.panel_XuanTian.Name = "panel_XuanTian";
            this.panel_XuanTian.Size = new Size(800, 0x19);
            this.panel_XuanTian.TabIndex = 0x15;
            this.panel_XuanTian.Paint += new PaintEventHandler(this.panel_XuanTian_Paint);
            this.lbl_XuanTian.AutoSize = true;
            this.lbl_XuanTian.Location = new Point(10, 6);
            this.lbl_XuanTian.Name = "lbl_XuanTian";
            this.lbl_XuanTian.Size = new Size(0x35, 12);
            this.lbl_XuanTian.TabIndex = 0;
            this.lbl_XuanTian.Text = "选填项目";
            this.pan_jiange.Dock = DockStyle.Top;
            this.pan_jiange.Location = new Point(0, 150);
            this.pan_jiange.Name = "pan_jiange";
            this.pan_jiange.Size = new Size(800, 15);
            this.pan_jiange.TabIndex = 0x11;
            this.pan_Company.Controls.Add(this.panel2);
            this.pan_Company.Controls.Add(this.pan_Table3);
            this.pan_Company.Dock = DockStyle.Top;
            this.pan_Company.Location = new Point(0, 100);
            this.pan_Company.Name = "pan_Company";
            this.pan_Company.Size = new Size(800, 50);
            this.pan_Company.TabIndex = 0x10;
            this.panel2.Controls.Add(this.pan_td20);
            this.panel2.Controls.Add(this.pan_td19);
            this.panel2.Controls.Add(this.pan_tr18);
            this.panel2.Controls.Add(this.pan_td17);
            this.panel2.Dock = DockStyle.Top;
            this.panel2.Location = new Point(0, 0x19);
            this.panel2.Name = "panel2";
            this.panel2.Size = new Size(800, 0x19);
            this.panel2.TabIndex = 15;
            this.pan_td20.Dock = DockStyle.Left;
            this.pan_td20.Location = new Point(600, 0);
            this.pan_td20.Name = "pan_td20";
            this.pan_td20.Size = new Size(200, 0x19);
            this.pan_td20.TabIndex = 3;
            this.pan_td20.Paint += new PaintEventHandler(this.pan_td20_Paint);
            this.pan_td19.Dock = DockStyle.Left;
            this.pan_td19.Location = new Point(400, 0);
            this.pan_td19.Name = "pan_td19";
            this.pan_td19.Size = new Size(200, 0x19);
            this.pan_td19.TabIndex = 2;
            this.pan_td19.Paint += new PaintEventHandler(this.pan_td19_Paint);
            this.pan_tr18.Controls.Add(this.txt_CoLinkName);
            this.pan_tr18.Dock = DockStyle.Left;
            this.pan_tr18.Location = new Point(200, 0);
            this.pan_tr18.Name = "pan_tr18";
            this.pan_tr18.Size = new Size(200, 0x19);
            this.pan_tr18.TabIndex = 1;
            this.pan_tr18.Paint += new PaintEventHandler(this.pan_tr18_Paint);
            this.txt_CoLinkName.Location = new Point(3, 2);
            this.txt_CoLinkName.MaxLength = 20;
            this.txt_CoLinkName.Name = "txt_CoLinkName";
            this.txt_CoLinkName.Size = new Size(0xab, 0x15);
            this.txt_CoLinkName.TabIndex = 7;
            this.txt_CoLinkName.KeyPress += new KeyPressEventHandler(this.txt_CoLinkName_KeyPress);
            this.pan_td17.Controls.Add(this.label2);
            this.pan_td17.Dock = DockStyle.Left;
            this.pan_td17.Location = new Point(0, 0);
            this.pan_td17.Name = "pan_td17";
            this.pan_td17.Size = new Size(200, 0x19);
            this.pan_td17.TabIndex = 0;
            this.pan_td17.Paint += new PaintEventHandler(this.pan_td17_Paint);
            this.label2.Location = new Point(0x6c, 6);
            this.label2.Name = "label2";
            this.label2.Size = new Size(0x54, 12);
            this.label2.TabIndex = 1;
            this.label2.Text = "联系人:";
            this.label2.TextAlign = ContentAlignment.MiddleRight;
            this.pan_Table3.Controls.Add(this.pan_16);
            this.pan_Table3.Controls.Add(this.pan_15);
            this.pan_Table3.Controls.Add(this.pan_14);
            this.pan_Table3.Controls.Add(this.pan_td13);
            this.pan_Table3.Dock = DockStyle.Top;
            this.pan_Table3.Location = new Point(0, 0);
            this.pan_Table3.Name = "pan_Table3";
            this.pan_Table3.Size = new Size(800, 0x19);
            this.pan_Table3.TabIndex = 14;
            this.pan_16.Controls.Add(this.txt_CoTel);
            this.pan_16.Dock = DockStyle.Left;
            this.pan_16.Location = new Point(600, 0);
            this.pan_16.Name = "pan_16";
            this.pan_16.Size = new Size(200, 0x19);
            this.pan_16.TabIndex = 3;
            this.pan_16.Paint += new PaintEventHandler(this.pan_16_Paint);
            this.txt_CoTel.Location = new Point(4, 2);
            this.txt_CoTel.MaxLength = 11;
            this.txt_CoTel.Name = "txt_CoTel";
            this.txt_CoTel.Size = new Size(0xab, 0x15);
            this.txt_CoTel.TabIndex = 6;
            this.txt_CoTel.KeyPress += new KeyPressEventHandler(this.txt_CoTel_KeyPress);
            this.pan_15.Controls.Add(this.lbl_ChainTel);
            this.pan_15.Dock = DockStyle.Left;
            this.pan_15.Location = new Point(400, 0);
            this.pan_15.Name = "pan_15";
            this.pan_15.Size = new Size(200, 0x19);
            this.pan_15.TabIndex = 2;
            this.pan_15.Paint += new PaintEventHandler(this.pan_15_Paint);
            this.lbl_ChainTel.AutoSize = true;
            this.lbl_ChainTel.Location = new Point(110, 6);
            this.lbl_ChainTel.Name = "lbl_ChainTel";
            this.lbl_ChainTel.Size = new Size(0x53, 12);
            this.lbl_ChainTel.TabIndex = 2;
            this.lbl_ChainTel.Text = "公司联系电话:";
            this.lbl_ChainTel.TextAlign = ContentAlignment.MiddleRight;
            this.pan_14.Controls.Add(this.txt_CoName);
            this.pan_14.Dock = DockStyle.Left;
            this.pan_14.Location = new Point(200, 0);
            this.pan_14.Name = "pan_14";
            this.pan_14.Size = new Size(200, 0x19);
            this.pan_14.TabIndex = 1;
            this.pan_14.Paint += new PaintEventHandler(this.pan_14_Paint);
            this.txt_CoName.Location = new Point(3, 2);
            this.txt_CoName.MaxLength = 20;
            this.txt_CoName.Name = "txt_CoName";
            this.txt_CoName.Size = new Size(0xab, 0x15);
            this.txt_CoName.TabIndex = 5;
            this.txt_CoName.KeyPress += new KeyPressEventHandler(this.txt_CoName_KeyPress);
            this.pan_td13.Controls.Add(this.lbl_CompanyName);
            this.pan_td13.Dock = DockStyle.Left;
            this.pan_td13.Location = new Point(0, 0);
            this.pan_td13.Name = "pan_td13";
            this.pan_td13.Size = new Size(200, 0x19);
            this.pan_td13.TabIndex = 0;
            this.pan_td13.Paint += new PaintEventHandler(this.pan_td13_Paint);
            this.lbl_CompanyName.Location = new Point(0x6c, 6);
            this.lbl_CompanyName.Name = "lbl_CompanyName";
            this.lbl_CompanyName.Size = new Size(0x54, 12);
            this.lbl_CompanyName.TabIndex = 1;
            this.lbl_CompanyName.Text = "公司名称:";
            this.lbl_CompanyName.TextAlign = ContentAlignment.MiddleRight;
            this.pan_Individual.Controls.Add(this.pan_Table2);
            this.pan_Individual.Dock = DockStyle.Top;
            this.pan_Individual.Location = new Point(0, 0x4b);
            this.pan_Individual.Name = "pan_Individual";
            this.pan_Individual.Size = new Size(800, 0x19);
            this.pan_Individual.TabIndex = 15;
            this.pan_Table2.Controls.Add(this.pan_td8);
            this.pan_Table2.Controls.Add(this.pan_td7);
            this.pan_Table2.Controls.Add(this.pan_td6);
            this.pan_Table2.Controls.Add(this.pan_td5);
            this.pan_Table2.Dock = DockStyle.Fill;
            this.pan_Table2.Location = new Point(0, 0);
            this.pan_Table2.Name = "pan_Table2";
            this.pan_Table2.Size = new Size(800, 0x19);
            this.pan_Table2.TabIndex = 10;
            this.pan_td8.Controls.Add(this.txt_GuestMoble);
            this.pan_td8.Dock = DockStyle.Left;
            this.pan_td8.Location = new Point(600, 0);
            this.pan_td8.Name = "pan_td8";
            this.pan_td8.Size = new Size(200, 0x19);
            this.pan_td8.TabIndex = 3;
            this.pan_td8.Paint += new PaintEventHandler(this.pan_td8_Paint);
            this.txt_GuestMoble.Location = new Point(3, 2);
            this.txt_GuestMoble.MaxLength = 11;
            this.txt_GuestMoble.Name = "txt_GuestMoble";
            this.txt_GuestMoble.Size = new Size(0xab, 0x15);
            this.txt_GuestMoble.TabIndex = 4;
            this.txt_GuestMoble.KeyPress += new KeyPressEventHandler(this.txt_GuestMoble_KeyPress);
            this.pan_td7.Controls.Add(this.lbl_Tel);
            this.pan_td7.Dock = DockStyle.Left;
            this.pan_td7.Location = new Point(400, 0);
            this.pan_td7.Name = "pan_td7";
            this.pan_td7.Size = new Size(200, 0x19);
            this.pan_td7.TabIndex = 2;
            this.pan_td7.Paint += new PaintEventHandler(this.pan_td7_Paint);
            this.lbl_Tel.Location = new Point(110, 6);
            this.lbl_Tel.Name = "lbl_Tel";
            this.lbl_Tel.Size = new Size(0x54, 12);
            this.lbl_Tel.TabIndex = 2;
            this.lbl_Tel.Text = "客户手机:";
            this.lbl_Tel.TextAlign = ContentAlignment.MiddleRight;
            this.pan_td6.Controls.Add(this.txt_GuestName);
            this.pan_td6.Dock = DockStyle.Left;
            this.pan_td6.Location = new Point(200, 0);
            this.pan_td6.Name = "pan_td6";
            this.pan_td6.Size = new Size(200, 0x19);
            this.pan_td6.TabIndex = 1;
            this.pan_td6.Paint += new PaintEventHandler(this.pan_td6_Paint);
            this.txt_GuestName.Location = new Point(3, 2);
            this.txt_GuestName.MaxLength = 11;
            this.txt_GuestName.Name = "txt_GuestName";
            this.txt_GuestName.Size = new Size(0xab, 0x15);
            this.txt_GuestName.TabIndex = 3;
            this.txt_GuestName.KeyPress += new KeyPressEventHandler(this.txt_GuestName_KeyPress);
            this.pan_td5.Controls.Add(this.lbl_GuestName);
            this.pan_td5.Dock = DockStyle.Left;
            this.pan_td5.Location = new Point(0, 0);
            this.pan_td5.Name = "pan_td5";
            this.pan_td5.Size = new Size(200, 0x19);
            this.pan_td5.TabIndex = 0;
            this.pan_td5.Paint += new PaintEventHandler(this.pan_td5_Paint);
            this.lbl_GuestName.Location = new Point(0x6c, 6);
            this.lbl_GuestName.Name = "lbl_GuestName";
            this.lbl_GuestName.Size = new Size(0x54, 12);
            this.lbl_GuestName.TabIndex = 1;
            this.lbl_GuestName.Text = "客户名称:";
            this.lbl_GuestName.TextAlign = ContentAlignment.MiddleRight;
            this.pan_Table1.Controls.Add(this.panel_td2);
            this.pan_Table1.Controls.Add(this.panel_td1);
            this.pan_Table1.Dock = DockStyle.Top;
            this.pan_Table1.Location = new Point(0, 50);
            this.pan_Table1.Name = "pan_Table1";
            this.pan_Table1.Size = new Size(800, 0x19);
            this.pan_Table1.TabIndex = 14;
            this.panel_td2.Controls.Add(this.link_AddGuestZheKou);
            this.panel_td2.Controls.Add(this.drp_GuestGreadType);
            this.panel_td2.Dock = DockStyle.Fill;
            this.panel_td2.Location = new Point(200, 0);
            this.panel_td2.Name = "panel_td2";
            this.panel_td2.Size = new Size(600, 0x19);
            this.panel_td2.TabIndex = 1;
            this.panel_td2.Paint += new PaintEventHandler(this.panel_td2_Paint);
            this.link_AddGuestZheKou.AutoSize = true;
            this.link_AddGuestZheKou.Location = new Point(0xb9, 6);
            this.link_AddGuestZheKou.Name = "link_AddGuestZheKou";
            this.link_AddGuestZheKou.Size = new Size(0x65, 12);
            this.link_AddGuestZheKou.TabIndex = 3;
            this.link_AddGuestZheKou.TabStop = true;
            this.link_AddGuestZheKou.Text = "新增客户折扣类型";
            this.link_AddGuestZheKou.LinkClicked += new LinkLabelLinkClickedEventHandler(this.link_AddGuestZheKou_LinkClicked);
            this.drp_GuestGreadType.DisplayMember = "Name";
            this.drp_GuestGreadType.DropDownStyle = ComboBoxStyle.DropDownList;
            this.drp_GuestGreadType.FormattingEnabled = true;
            this.drp_GuestGreadType.Location = new Point(3, 2);
            this.drp_GuestGreadType.Name = "drp_GuestGreadType";
            this.drp_GuestGreadType.SelectValueNew = "";
            this.drp_GuestGreadType.Size = new Size(0xab, 20);
            this.drp_GuestGreadType.TabIndex = 2;
            this.drp_GuestGreadType.ValueMember = "Value";
            this.drp_GuestGreadType.KeyPress += new KeyPressEventHandler(this.drp_GuestGreadType_KeyPress);
            this.panel_td1.Controls.Add(this.lbl_GuestGread);
            this.panel_td1.Dock = DockStyle.Left;
            this.panel_td1.Location = new Point(0, 0);
            this.panel_td1.Name = "panel_td1";
            this.panel_td1.Size = new Size(200, 0x19);
            this.panel_td1.TabIndex = 0;
            this.panel_td1.Paint += new PaintEventHandler(this.panel_td1_Paint);
            this.lbl_GuestGread.Location = new Point(0x6d, 6);
            this.lbl_GuestGread.Name = "lbl_GuestGread";
            this.lbl_GuestGread.Size = new Size(0x54, 12);
            this.lbl_GuestGread.TabIndex = 0;
            this.lbl_GuestGread.Text = "客户折扣类型:";
            this.lbl_GuestGread.TextAlign = ContentAlignment.MiddleRight;
            this.pan_td4.Controls.Add(this.drp_GuestType);
            this.pan_td4.Controls.Add(this.pane_td3);
            this.pan_td4.Dock = DockStyle.Top;
            this.pan_td4.Location = new Point(0, 0x19);
            this.pan_td4.Name = "pan_td4";
            this.pan_td4.Size = new Size(800, 0x19);
            this.pan_td4.TabIndex = 7;
            this.pan_td4.Paint += new PaintEventHandler(this.pan_td4_Paint);
            this.drp_GuestType.DisplayMember = "Name";
            this.drp_GuestType.DropDownStyle = ComboBoxStyle.DropDownList;
            this.drp_GuestType.FormattingEnabled = true;
            this.drp_GuestType.Items.AddRange(new object[] { "个人", "公司" });
            this.drp_GuestType.Location = new Point(0xca, 3);
            this.drp_GuestType.Name = "drp_GuestType";
            this.drp_GuestType.SelectValueNew = "";
            this.drp_GuestType.Size = new Size(0xab, 20);
            this.drp_GuestType.TabIndex = 1;
            this.drp_GuestType.ValueMember = "Value";
            this.drp_GuestType.KeyPress += new KeyPressEventHandler(this.drp_GuestType_KeyPress);
            this.drp_GuestType.SelectedValueChanged += new EventHandler(this.drp_GuestType_SelectedValueChanged);
            this.pane_td3.Controls.Add(this.lbl_GuestType);
            this.pane_td3.Dock = DockStyle.Left;
            this.pane_td3.Location = new Point(0, 0);
            this.pane_td3.Name = "pane_td3";
            this.pane_td3.Size = new Size(200, 0x19);
            this.pane_td3.TabIndex = 1;
            this.pane_td3.Paint += new PaintEventHandler(this.pane_td3_Paint);
            this.lbl_GuestType.Location = new Point(0x6d, 6);
            this.lbl_GuestType.Name = "lbl_GuestType";
            this.lbl_GuestType.Size = new Size(0x54, 12);
            this.lbl_GuestType.TabIndex = 0;
            this.lbl_GuestType.Text = "客户类型:";
            this.lbl_GuestType.TextAlign = ContentAlignment.MiddleRight;
            this.panel_BiTian.Controls.Add(this.lbl_GuestId);
            this.panel_BiTian.Controls.Add(this.lbl_BiTian);
            this.panel_BiTian.Dock = DockStyle.Top;
            this.panel_BiTian.Location = new Point(0, 0);
            this.panel_BiTian.Name = "panel_BiTian";
            this.panel_BiTian.Size = new Size(800, 0x19);
            this.panel_BiTian.TabIndex = 6;
            this.panel_BiTian.Paint += new PaintEventHandler(this.panel_BiTian_Paint);
            this.lbl_GuestId.AutoSize = true;
            this.lbl_GuestId.Location = new Point(0x45, 6);
            this.lbl_GuestId.Name = "lbl_GuestId";
            this.lbl_GuestId.Size = new Size(0x29, 12);
            this.lbl_GuestId.TabIndex = 1;
            this.lbl_GuestId.Text = "label3";
            this.lbl_GuestId.Visible = false;
            this.lbl_BiTian.AutoSize = true;
            this.lbl_BiTian.Location = new Point(10, 6);
            this.lbl_BiTian.Name = "lbl_BiTian";
            this.lbl_BiTian.Size = new Size(0x35, 12);
            this.lbl_BiTian.TabIndex = 0;
            this.lbl_BiTian.Text = "必填项目";
            this.panel_Button.Controls.Add(this.lbl_TiShi2);
            this.panel_Button.Controls.Add(this.lbl_TiShi);
            this.panel_Button.Controls.Add(this.btn_Close);
            this.panel_Button.Controls.Add(this.btn_Save);
            this.panel_Button.Dock = DockStyle.Bottom;
            this.panel_Button.Location = new Point(0, 0xef);
            this.panel_Button.Name = "panel_Button";
            this.panel_Button.Size = new Size(800, 0x2b);
            this.panel_Button.TabIndex = 5;
            this.panel_Button.Paint += new PaintEventHandler(this.panel_Button_Paint);
            this.lbl_TiShi2.AutoSize = true;
            this.lbl_TiShi2.Location = new Point(0x243, 15);
            this.lbl_TiShi2.Name = "lbl_TiShi2";
            this.lbl_TiShi2.Size = new Size(0xcb, 12);
            this.lbl_TiShi2.TabIndex = 12;
            this.lbl_TiShi2.Text = "使用小技巧: Ctrl+S 快速保存 记录.";
            this.lbl_TiShi.AutoSize = true;
            this.lbl_TiShi.Location = new Point(10, 15);
            this.lbl_TiShi.Name = "lbl_TiShi";
            this.lbl_TiShi.Size = new Size(0xef, 12);
            this.lbl_TiShi.TabIndex = 11;
            this.lbl_TiShi.Text = "使用小技巧:回车(Enter)跳到下一个输入项.";
            this.btn_Close.Location = new Point(0x1ad, 10);
            this.btn_Close.Name = "btn_Close";
            this.btn_Close.Size = new Size(0x4b, 0x17);
            this.btn_Close.TabIndex = 1;
            this.btn_Close.Text = "关 闭";
            this.btn_Close.UseVisualStyleBackColor = true;
            this.btn_Close.Click += new EventHandler(this.btn_Close_Click);
            this.btn_Save.Location = new Point(0x128, 10);
            this.btn_Save.Name = "btn_Save";
            this.btn_Save.Size = new Size(0x4b, 0x17);
            this.btn_Save.TabIndex = 0;
            this.btn_Save.Text = "保 存";
            this.btn_Save.UseVisualStyleBackColor = true;
            this.btn_Save.Click += new EventHandler(this.btn_Save_Click);
            this.panel9.Dock = DockStyle.Bottom;
            this.panel9.Location = new Point(0, 0x11a);
            this.panel9.Name = "panel9";
            this.panel9.Size = new Size(800, 5);
            this.panel9.TabIndex = 3;
            this.pan_Rights.Dock = DockStyle.Right;
            this.pan_Rights.Location = new Point(810, 10);
            this.pan_Rights.Name = "pan_Rights";
            this.pan_Rights.Size = new Size(10, 0x11f);
            this.pan_Rights.TabIndex = 3;
            this.pan_Lefts.Dock = DockStyle.Left;
            this.pan_Lefts.Location = new Point(0, 10);
            this.pan_Lefts.Name = "pan_Lefts";
            this.pan_Lefts.Size = new Size(10, 0x11f);
            this.pan_Lefts.TabIndex = 2;
            this.pan_Bottoms.Dock = DockStyle.Bottom;
            this.pan_Bottoms.Location = new Point(0, 0x129);
            this.pan_Bottoms.Name = "pan_Bottoms";
            this.pan_Bottoms.Size = new Size(820, 10);
            this.pan_Bottoms.TabIndex = 1;
            this.pane_TopT.Dock = DockStyle.Top;
            this.pane_TopT.Location = new Point(0, 0);
            this.pane_TopT.Name = "pane_TopT";
            this.pane_TopT.Size = new Size(820, 10);
            this.pane_TopT.TabIndex = 0;
            this.pan_DockBottom.BackColor = Color.FromArgb(0xaf, 0xbf, 190);
            this.pan_DockBottom.Dock = DockStyle.Bottom;
            this.pan_DockBottom.Location = new Point(1, 0x133);
            this.pan_DockBottom.Name = "pan_DockBottom";
            this.pan_DockBottom.Size = new Size(820, 1);
            this.pan_DockBottom.TabIndex = 2;
            this.pan_DockRight.BackColor = Color.FromArgb(0xaf, 0xbf, 190);
            this.pan_DockRight.Dock = DockStyle.Right;
            this.pan_DockRight.Location = new Point(0x335, 0);
            this.pan_DockRight.Name = "pan_DockRight";
            this.pan_DockRight.Size = new Size(1, 0x134);
            this.pan_DockRight.TabIndex = 1;
            this.pan_Top.Controls.Add(this.pan_ZhongJian);
            this.pan_Top.Controls.Add(this.pan_TopRight);
            this.pan_Top.Controls.Add(this.pan_TopLeft);
            this.pan_Top.Dock = DockStyle.Top;
            this.pan_Top.Location = new Point(0, 0);
            this.pan_Top.Name = "pan_Top";
            this.pan_Top.Size = new Size(0x336, 0x20);
            this.pan_Top.TabIndex = 4;
            this.pan_TopLeft.BackgroundImage = Resources.uc_title;
            this.pan_TopLeft.Dock = DockStyle.Left;
            this.pan_TopLeft.Location = new Point(0, 0);
            this.pan_TopLeft.Name = "pan_TopLeft";
            this.pan_TopLeft.Size = new Size(0x1f, 0x20);
            this.pan_TopLeft.TabIndex = 0;
            this.pan_TopLeft.MouseDown += new MouseEventHandler(this.pan_TopLeft_MouseDown);
            base.AutoScaleDimensions = new SizeF(6f, 12f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.ClientSize = new Size(0x336, 340);
            base.Controls.Add(this.pan_Dock);
            base.Controls.Add(this.pan_Top);
            base.FormBorderStyle = FormBorderStyle.None;
            base.MaximizeBox = false;
            base.MinimizeBox = false;
            base.Name = "FrmGuestEdit";
            base.ShowInTaskbar = false;
            this.Text = "新增连锁店";
            this.pan_ZhongJian.ResumeLayout(false);
            this.pan_ZhongJian.PerformLayout();
            this.pan_Dock.ResumeLayout(false);
            this.pan_AllPanel.ResumeLayout(false);
            this.pan_AllPlanes.ResumeLayout(false);
            this.panel15.ResumeLayout(false);
            this.pan_td28.ResumeLayout(false);
            this.pan_td28.PerformLayout();
            this.pan_td27.ResumeLayout(false);
            this.pan_td26.ResumeLayout(false);
            this.pan_td26.PerformLayout();
            this.pan_td25.ResumeLayout(false);
            this.panel8.ResumeLayout(false);
            this.pan_24.ResumeLayout(false);
            this.pan_td23.ResumeLayout(false);
            this.pan_td23.PerformLayout();
            this.pan_td22.ResumeLayout(false);
            this.pan_td21.ResumeLayout(false);
            this.panel_XuanTian.ResumeLayout(false);
            this.panel_XuanTian.PerformLayout();
            this.pan_Company.ResumeLayout(false);
            this.panel2.ResumeLayout(false);
            this.pan_tr18.ResumeLayout(false);
            this.pan_tr18.PerformLayout();
            this.pan_td17.ResumeLayout(false);
            this.pan_Table3.ResumeLayout(false);
            this.pan_16.ResumeLayout(false);
            this.pan_16.PerformLayout();
            this.pan_15.ResumeLayout(false);
            this.pan_15.PerformLayout();
            this.pan_14.ResumeLayout(false);
            this.pan_14.PerformLayout();
            this.pan_td13.ResumeLayout(false);
            this.pan_Individual.ResumeLayout(false);
            this.pan_Table2.ResumeLayout(false);
            this.pan_td8.ResumeLayout(false);
            this.pan_td8.PerformLayout();
            this.pan_td7.ResumeLayout(false);
            this.pan_td6.ResumeLayout(false);
            this.pan_td6.PerformLayout();
            this.pan_td5.ResumeLayout(false);
            this.pan_Table1.ResumeLayout(false);
            this.panel_td2.ResumeLayout(false);
            this.panel_td2.PerformLayout();
            this.panel_td1.ResumeLayout(false);
            this.pan_td4.ResumeLayout(false);
            this.pane_td3.ResumeLayout(false);
            this.panel_BiTian.ResumeLayout(false);
            this.panel_BiTian.PerformLayout();
            this.panel_Button.ResumeLayout(false);
            this.panel_Button.PerformLayout();
            this.pan_Top.ResumeLayout(false);
            base.ResumeLayout(false);
        }

        private void link_AddGuestZheKou_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            FrmGuestGradeAdd add = new FrmGuestGradeAdd();
            if (add.ShowDialog() == DialogResult.OK)
            {
                this.drp_GuestGreadType.BeginUpdate();
                this.drp_GuestGreadType.Items.Clear();
                DataTable list = GuestGradeBll.GetList("ChainNum=" + this.user.ChainNum);
                foreach (DataRow row in list.Rows)
                {
                    this.drp_GuestGreadType.AddItem(row["GuestName"].ToString(), row["GuestTypeId"].ToString());
                }
                if (list.Rows.Count > 0)
                {
                    this.drp_GuestGreadType.SelectedIndex = 0;
                }
                this.drp_GuestType.EndUpdate();
            }
        }

        private void pan_14_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_14, Color.FromArgb(0xca, 0xc9, 0xce), 0, 0, 1, 1);
        }

        private void pan_15_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_15, Color.FromArgb(0xca, 0xc9, 0xce), 0, 0, 1, 1);
        }

        private void pan_16_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_16, Color.FromArgb(0xca, 0xc9, 0xce), 0, 0, 1, 1);
        }

        private void pan_24_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_24, Color.FromArgb(0xca, 0xc9, 0xce), 0, 0, 1, 1);
        }

        private void pan_td13_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_td13, Color.FromArgb(0xca, 0xc9, 0xce), 1, 0, 1, 1);
        }

        private void pan_td17_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_td17, Color.FromArgb(0xca, 0xc9, 0xce), 1, 0, 1, 1);
        }

        private void pan_td19_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_td19, Color.FromArgb(0xca, 0xc9, 0xce), 0, 0, 1, 1);
        }

        private void pan_td20_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_td20, Color.FromArgb(0xca, 0xc9, 0xce), 0, 0, 1, 1);
        }

        private void pan_td21_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_td21, Color.FromArgb(0xca, 0xc9, 0xce), 1, 0, 1, 1);
        }

        private void pan_td22_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_td22, Color.FromArgb(0xca, 0xc9, 0xce), 0, 0, 1, 1);
        }

        private void pan_td23_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_td23, Color.FromArgb(0xca, 0xc9, 0xce), 0, 0, 1, 1);
        }

        private void pan_td25_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_td25, Color.FromArgb(0xca, 0xc9, 0xce), 1, 0, 1, 1);
        }

        private void pan_td26_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_td26, Color.FromArgb(0xca, 0xc9, 0xce), 0, 0, 1, 1);
        }

        private void pan_td27_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_td27, Color.FromArgb(0xca, 0xc9, 0xce), 1, 0, 1, 1);
        }

        private void pan_td28_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_td28, Color.FromArgb(0xca, 0xc9, 0xce), 0, 0, 1, 1);
        }

        private void pan_td4_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_td4, Color.FromArgb(0xca, 0xc9, 0xce), 1, 0, 1, 1);
        }

        private void pan_td5_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_td5, Color.FromArgb(0xca, 0xc9, 0xce), 1, 0, 1, 1);
        }

        private void pan_td6_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_td6, Color.FromArgb(0xca, 0xc9, 0xce), 0, 0, 1, 1);
        }

        private void pan_td7_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_td7, Color.FromArgb(0xca, 0xc9, 0xce), 0, 0, 1, 1);
        }

        private void pan_td8_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_td8, Color.FromArgb(0xca, 0xc9, 0xce), 0, 0, 1, 1);
        }

        private void pan_TopLeft_MouseDown(object sender, MouseEventArgs e)
        {
            ReleaseCapture();
            SendMessage(base.Handle, 0x112, 0xf012, 0);
        }

        private void pan_tr18_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_tr18, Color.FromArgb(0xca, 0xc9, 0xce), 0, 0, 1, 1);
        }

        private void pan_ZhongJian_MouseDown(object sender, MouseEventArgs e)
        {
            ReleaseCapture();
            SendMessage(base.Handle, 0x112, 0xf012, 0);
        }

        private void pane_td3_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pane_td3, Color.FromArgb(0xca, 0xc9, 0xce), 1, 0, 1, 1);
        }

        private void panel_BiTian_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.panel_BiTian, Color.FromArgb(0xca, 0xc9, 0xce), 1, 1, 1, 1);
        }

        private void panel_Button_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.panel_Button, Color.FromArgb(0xca, 0xc9, 0xce), 1, 1, 1, 1);
        }

        private void Panel_ResetPaint(PaintEventArgs e, Panel panel, Color color, int leftBoder, int topBoder, int rightBoder, int bottomBoder)
        {
            ControlPaint.DrawBorder(e.Graphics, panel.ClientRectangle, color, leftBoder, ButtonBorderStyle.Solid, color, topBoder, ButtonBorderStyle.Solid, color, rightBoder, ButtonBorderStyle.Solid, color, bottomBoder, ButtonBorderStyle.Solid);
        }

        private void panel_td1_Paint(object sender, PaintEventArgs e)
        {
            if (this.config != null)
            {
                if (this.config.IsUseAgio == 1)
                {
                    this.Panel_ResetPaint(e, this.panel_td1, Color.FromArgb(0xca, 0xc9, 0xce), 1, 0, 1, 1);
                }
                else
                {
                    this.Panel_ResetPaint(e, this.panel_td1, Color.FromArgb(0xca, 0xc9, 0xce), 1, 1, 1, 1);
                }
            }
            else
            {
                this.Panel_ResetPaint(e, this.panel_td1, Color.FromArgb(0xca, 0xc9, 0xce), 1, 1, 1, 1);
            }
        }

        private void panel_td2_Paint(object sender, PaintEventArgs e)
        {
            if (this.config != null)
            {
                if (this.config.IsUseAgio == 1)
                {
                    this.Panel_ResetPaint(e, this.panel_td2, Color.FromArgb(0xca, 0xc9, 0xce), 0, 0, 1, 1);
                }
                else
                {
                    this.Panel_ResetPaint(e, this.panel_td2, Color.FromArgb(0xca, 0xc9, 0xce), 0, 1, 1, 1);
                }
            }
            else
            {
                this.Panel_ResetPaint(e, this.panel_td2, Color.FromArgb(0xca, 0xc9, 0xce), 0, 1, 1, 1);
            }
        }

        private void panel_XuanTian_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.panel_XuanTian, Color.FromArgb(0xca, 0xc9, 0xce), 1, 1, 1, 1);
        }

        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            return ((keyData == Keys.Tab) || base.ProcessCmdKey(ref msg, keyData));
        }

        [DllImport("user32.dll")]
        public static extern bool ReleaseCapture();
        [DllImport("user32.dll")]
        public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
        private void txt_Address_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == '\r')
            {
                this.txt_Remark.Select();
            }
        }

        private void txt_CoLinkName_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == '\r')
            {
                this.drp_PayType.Select();
            }
        }

        private void txt_CoName_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == '\r')
            {
                this.txt_CoTel.Select();
            }
        }

        private void txt_CoTel_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == '\r')
            {
                this.txt_CoLinkName.Select();
            }
        }

        private void txt_GuestMoble_KeyPress(object sender, KeyPressEventArgs e)
        {
            if ((e.KeyChar < '0') || (e.KeyChar > '9'))
            {
                e.Handled = true;
            }
            if (e.KeyChar == '\r')
            {
                this.drp_PayType.Select();
            }
        }

        private void txt_GuestName_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == '\r')
            {
                this.txt_GuestMoble.Select();
            }
        }

        private void txt_Remark_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == '\r')
            {
                this.btn_Save.Select();
            }
        }
    }
}

